1. Field of the Invention
The present invention relates to error diffusion coefficients used in a printer which prints an image after binary coding the image. More particularly, the present invention relates to a method and an apparatus for determining optimal error diffusion coefficients.
2. Description of the Related Art
In general, an image having 256 brightness levels between 0 (black) and 255 (white) is referred to as a continual gray level image. A printer can reproduce only two gray levels by either printing a dot or not printing a dot on a printing medium. Therefore, in order to print an image having 256 gray levels based on a monitor using a printer, a unit for converting the image into binary codes is needed. A halftone method is a method of representing a continual gray level image with 0 and 255, and a binary image is an image generated by the halftone method.
An error diffusion method is widely used as the halftone method. In error diffusion methods, an input gray level image is converted into binary code values using a threshold value and errors generated by binarization are diffused into neighboring pixels. Such error diffusion methods include the Floyd-Steinberg method, which uses a fixed error diffusion coefficient, and a method that uses an error diffusion coefficient that varies with input gray value.
The Floyd-Steinberg method includes adding a gray value of an input pixel to an error caused by an error diffusion coefficient propagated using an error coefficient from neighboring pixels, converting the sum of the input grey value and the error (hereinafter referred to as “combined value”) into a binary code using a threshold value, and finally transmitting the error to neighboring pixels through an error diffusion filter having the error diffusion coefficient. In the Floyd-Steinberg method, the combined value is compared with the threshold value, a binary image of gray level 255 is output when the combined value is larger than the threshold value, and a binary image of gray level 0 is output when the combined value is smaller than the threshold value. After outputting the binary image, an error between the gray level (0 or 255) of the binary image and the combined value is calculated, and the error is transmitted to peripheral areas, which are not changed into binary.
The method that uses a changing error diffusion coefficient includes selecting an error diffusion filter from a look-up table, adding the input gray level value to the error transmitted from neighboring pixels, converting the sum of the input grey value and the error (hereinafter referred to as a “combined value”) into a binary value using a threshold value, and transmitting the error to neighboring pixels through the error diffusion filter. In this method, a binary image is output by comparing the combined value with the threshold value, and the error between the gray level value of the output binary image and the combined value is calculated and transmitted to peripheral portions through the error diffusion filter.
However, when an image is binarized using a fixed error diffusion coefficient, a worm artifact is generated, and the image quality is lowered since minor pixels are not distributed evenly. Also, when an image is binarized using a changing error diffusion coefficient, the error diffusion coefficient is determined through trial and error operations, and thus, an effective error diffusion coefficient cannot be determined in a short time period.